﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Lidgren.Network;
using Lidgren.Network.Xna;

namespace SharedLib.Engine
{
    public class Creature : Entity
    {
        public Int32 HP;
        public Int32 HPMAX;

        public Int32 Mana;
        public Int32 ManaMAX;

        public Creature Target = null;

        public Creature() : base()
        {
            this.Type = EntityType.Creature;
        }

        public override void Update(long time)
        {
            base.Update(time);
        }

        public override void Update(Microsoft.Xna.Framework.GameTime gameTime)
        {
            base.Update(gameTime);
        }

        public override void WriteData(NetOutgoingMessage outmsg)
        {
            base.WriteData(outmsg);
        }

        public override void ReadData(NetIncomingMessage _msgBuffer)
        {
            this.ID = _msgBuffer.ReadInt64();
            this.Name = _msgBuffer.ReadString();
            this.Position = _msgBuffer.ReadVector2();
            this.Rotation = _msgBuffer.ReadFloat();
            this.HP = _msgBuffer.ReadInt32();
            this.HPMAX = _msgBuffer.ReadInt32();
            this.Mana = _msgBuffer.ReadInt32();
            this.ManaMAX = _msgBuffer.ReadInt32();
        }
    }
}
